package cn.tmpan.project.exception;

import cn.tmpan.project.common.enums.ResponseCode;
import lombok.Data;

/**
 * @author tieMinPan
 * @Desc: Description
 * @date 2020-01-03 15:21
 */
@Data
public class CustomException extends RuntimeException {

    protected int code;

    protected String message;

    private ResponseCode responseCode;


    public CustomException(ResponseCode responseCode) {
        this.responseCode = responseCode;
        this.code = responseCode.getCode();
        this.message = responseCode.getDesc();
    }
}
